async function uploadFile (req, res) {
  const { file } = req
  if (!file) {
    return res.status(400).json({ msg: '文件为空', code: 400 })
  }
  // 返回图片地址
  res.json({ msg: 'OK', code: 200, data: { filePath: file.path } })
}
module.exports = { uploadFile }